package e2q.portal.domain.uPortal;

import javax.persistence.Column;

/**
 * UpUserLayoutId entity.
 * 
 * @author MyEclipse Persistence Tools
 */

public class UpUserLayoutId implements java.io.Serializable {

	// Fields
	@Column(name = "LAYOUT_ID")
	private Integer layoutId;
	@Column(name = "USER_ID")
	private Integer userId;

	// Constructors

	/** default constructor */
	public UpUserLayoutId() {
	}

	/** full constructor */
	public UpUserLayoutId(Integer layoutId, Integer userId) {
		this.layoutId = layoutId;
		this.userId = userId;
	}

	// Property accessors

	public Integer getLayoutId() {
		return this.layoutId;
	}

	public void setLayoutId(Integer layoutId) {
		this.layoutId = layoutId;
	}

	public Integer getUserId() {
		return this.userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	@Override
	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof UpUserLayoutId))
			return false;
		UpUserLayoutId castOther = (UpUserLayoutId) other;

		return ((this.getLayoutId() == castOther.getLayoutId()) || (this
				.getLayoutId() != null
				&& castOther.getLayoutId() != null && this.getLayoutId()
				.equals(castOther.getLayoutId())))
				&& ((this.getUserId() == castOther.getUserId()) || (this
						.getUserId() != null
						&& castOther.getUserId() != null && this.getUserId()
						.equals(castOther.getUserId())));
	}

	@Override
	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getLayoutId() == null ? 0 : this.getLayoutId().hashCode());
		result = 37 * result
				+ (getUserId() == null ? 0 : this.getUserId().hashCode());
		return result;
	}

}